#ifndef __S_MOUSE_CONFIG_H_INCLUDED__
#define __S_MOUSE_CONFIG_H_INCLUDED__

#include "IrrCompileConfig.h"
#include "os.h"
#include "irrTypes.h"
namespace game
{
	class IDeviceManager;

	class SMouseConfig
	{
	public:
		s32 DefaultX;
		s32 DefaultY;

		s32 CurrentX;
		s32 CurrentY;


		SMouseConfig(IDeviceManager* deviceManager):	DeviceManager(0),
														LastTimeMoved(0),
														MinX(0),
														MinY(0),
														MaxX(0),
														MaxY(0),
														MaxOffsetX(0),
														MaxOffsetY(0),
														IsMoved(false),
														CurrentX(0),
														CurrentY(0),
														DefaultX(0),
														DefaultY(0)
														
		{
			this->DeviceManager = deviceManager;

#ifdef _IRR_PSP_
			DefaultX = 240;
			DefaultY = 136;
#else
			DefaultX = 480;
			DefaultY = 272;
#endif
			MinX = 40;
			MinY = 40;

			MaxX = (DefaultX * 2) - MinX;
			MaxY = (DefaultY * 2) - MinY;

			MaxOffsetX = (MaxX - MinX)/2;
			MaxOffsetY = (MaxY - MinY)/2;
		}

		SMouseConfig& operator=(SMouseConfig&)
		{
		}

		virtual ~SMouseConfig()
		{
		}

		void setIsMoved(bool value)
		{
			if(value)
			{
				LastTimeMoved = irr::os::Timer::getRealTime();
			}

			IsMoved = value;
		}

		bool getIsMoved()
		{
			return IsMoved;
		}

		u32 getLastTimeMoved()
		{
			return LastTimeMoved;
		}

		s32 getMinX()
		{
			return MinX;
		}

		s32 getMinY()
		{
			return MinY;
		}

		s32 getMaxX()
		{
			return MaxX;
		}
		s32 getMaxY()
		{
			return	MaxY;
		}
		
		s32 getMaxOffsetX()
		{
			return MaxOffsetX;
		}

		s32 getMaxOffsetY()
		{
			return MaxOffsetY;
		}

		s32 getMinOffsetX()
		{
			return -MaxOffsetX;
		}

		s32 getMinOffsetY()
		{
			return -MaxOffsetY;
		}

	private:
		SMouseConfig()
		{

		}

		IDeviceManager* DeviceManager;

		bool IsMoved;

		u32 LastTimeMoved;
		s32 MinX;
		s32 MinY;
		s32 MaxX;
		s32 MaxY;
		s32 MaxOffsetX;
		s32 MaxOffsetY;
	};
}

#endif